﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/QuanLy.master" AutoEventWireup="true"
    CodeFile="Khach_Hang.aspx.cs" Inherits="Admin_Khach_Hang" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:Label ID="thongbaotrantrung" runat="server"></asp:Label>
    <asp:Panel ID="panel" Visible="true" runat="server">
        <table width="100%">
            <tr>
                <td>
                    <asp:GridView ID="gvDuLieu" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                        CellPadding="4" AllowSorting="True" CaptionAlign="Top" ForeColor="#333333" Width="100%"
                        GridLines="None" OnPageIndexChanging="gvDuLieu_PageIndexChanging" OnRowCancelingEdit="gvDuLieu_RowCancelingEdit"
                        OnRowDeleting="gvDuLieu_RowDeleting" OnRowEditing="gvDuLieu_RowEditing" OnRowUpdating="gvDuLieu_RowUpdating"
                        OnSorting="gvDuLieu_Sorting">
                        <Columns>
                            <asp:BoundField DataField="makh" HeaderText="ID" SortExpression="makh" ReadOnly="True" />
                            <asp:BoundField DataField="hotenkh" HeaderText="HỌ V&#192; T&#202;N" SortExpression="hotenkh" />
                            <asp:BoundField DataField="tendnkh" HeaderText="USER" SortExpression="tendnkh" />
                            <asp:BoundField DataField="matkhaukh" HeaderText="PASS" SortExpression="matkhaukh" />
                            <asp:BoundField DataField="dienthoaikh" HeaderText="ĐIỆN THOẠI" SortExpression="dienthoaikh" />
                            <asp:TemplateField HeaderText="NG&#192;Y SINH" SortExpression="ngaysinh">
                                <ItemTemplate>
                                    <%#String.Format("{0:MM/dd/yy}",DataBinder.Eval(Container, "DataItem.ngaysinh"))%>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <asp:TextBox ID="ngaysinh" runat="server" Text='<%#String.Format("{0:MM/dd/yy}",DataBinder.Eval(Container, "DataItem.ngaysinh"))%>'></asp:TextBox>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="ĐỊA CHỈ" SortExpression="diachikh">
                                <EditItemTemplate>
                                    <asp:TextBox ID="diachi2" runat="server" Text='<%#Eval("diachikh") %>'></asp:TextBox>
                                </EditItemTemplate>
                                <ItemTemplate>
                                    <asp:TextBox ID="diachi1" ReadOnly="true" runat="server" Text='<%#Eval("diachikh") %>'></asp:TextBox>
                                </ItemTemplate>
                                <HeaderStyle HorizontalAlign="Left" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="emailkh" HeaderText="EMAIL" SortExpression="emailkh" />
                            <asp:TemplateField HeaderText="PH&#193;I" SortExpression="gioitinh">
                                <ItemTemplate>
                                    <center>
                                        <%#((bool)DataBinder.Eval(Container, "DataItem.Gioitinh") == true ? "Nam" : "Nữ")%></center>
                                </ItemTemplate>
                                <EditItemTemplate>
                                    <center>
                                        <asp:CheckBox ID="gioitinh" runat="server" Checked='<%#((bool)DataBinder.Eval(Container, "DataItem.Gioitinh") == true ? true : false)%>' /></center>
                                </EditItemTemplate>
                            </asp:TemplateField>
                            <asp:CommandField ShowEditButton="True" CancelText="&lt;img border='0' src='images/nut/cancel.gif'&gt;"
                                DeleteText="X&#211;A" EditText="&lt;img border='0' src='images/nut/sua.jpg'&gt;"
                                InsertText="TH&#202;M" NewText="MỚI" SelectText="CHỌN" UpdateText="&lt;img border='0' src='images/nut/save.gif'&gt;" />
                            <asp:CommandField ShowDeleteButton="True" CancelText="KH&#212;NG" DeleteText="&lt;img border='0' src='images/nut/xoa.jpg'&gt;"
                                EditText="SỬA" InsertText="TH&#202;M" NewText="MỚI" SelectText="CHỌN" UpdateText="LƯU" />
                        </Columns>
                        <PagerSettings FirstPageText="ĐẦU TI&#202;N" LastPageText="CUỐI C&#217;NG" NextPageText="TIẾP"
                            PreviousPageText="L&#217;I" PageButtonCount="1" />
                        <RowStyle BackColor="#EFF3FB" CssClass="khongxuonghang" />
                        <EditRowStyle BackColor="#2461BF" />
                        <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                        <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                        <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                        <AlternatingRowStyle BackColor="White" />
                        <SortedAscendingCellStyle BackColor="#F5F7FB" />
                        <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                        <SortedDescendingCellStyle BackColor="#E9EBEF" />
                        <SortedDescendingHeaderStyle BackColor="#4870BE" />
                    </asp:GridView>
                </td>
            </tr>
        </table>
        <br />
        <hr color="#008000" size="1">
        <asp:Label ID="showthongbao" runat="server" Text=""></asp:Label>
        <table width="100%">
            <tr>
                <td colspan="3">
                    <strong><span style="color: #ff0000">THÊM MỚI KHÁCH HÀNG</span></strong>
                </td>
            </tr>
            <tr>
                <td colspan="3">
                </td>
            </tr>
            <tr>
                <td>
                    <span style="color: #0000ff">TÊN ĐĂNG NHẬP</span><span style="color: red"> - Khoảng
                        15 Ký Tự Nhé</span>
                </td>
                <td colspan="2">
                    <asp:TextBox ID="tendangnhap" runat="server" Width="100%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <span style="color: #0000ff">MẬT KHẨU</span>
                </td>
                <td colspan="2">
                    <asp:TextBox ID="matkhau" runat="server" Width="100%" TextMode="Password"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <span style="color: #0000ff">HỌ VÀ TÊN</span>
                </td>
                <td colspan="2">
                    <asp:TextBox ID="hovaten" runat="server" Width="100%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <span style="color: #0000ff">NGÀY SINH</span>
                </td>
                <td colspan="2" rowspan="1">
                    Ngày
                    <asp:DropDownList ID="ngaysinh" runat="server">
                    </asp:DropDownList>
                    Tháng
                    <asp:DropDownList ID="thangsinh" runat="server">
                    </asp:DropDownList>
                    Năm
                    <asp:DropDownList ID="namsinh" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <span style="color: #0000ff">EMAIL</span>
                </td>
                <td colspan="2">
                    <asp:TextBox ID="email" runat="server" Width="100%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <span style="color: #0000ff">ĐỊA CHỈ</span>
                </td>
                <td colspan="2" rowspan="1">
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="3">
                    <asp:TextBox ID="diachi" runat="server" Height="83px" TextMode="MultiLine" Width="100%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <span style="color: #0000ff">GIỚI TÍNH</span>
                </td>
                <td colspan="2">
                    <asp:DropDownList ID="gioitinh" runat="server" Width="100px">
                        <asp:ListItem Selected="True" Value="1">Nam</asp:ListItem>
                        <asp:ListItem Value="0">Nữ</asp:ListItem>
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <span style="color: #0000ff">ĐIỆN THOẠI</span>
                </td>
                <td colspan="2">
                    <asp:TextBox ID="dienthoai" runat="server" Width="100%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td colspan="2">
                </td>
            </tr>
            <tr>
                <td>
                </td>
                <td colspan="2">
                    <asp:Button ID="luudanhmuc" runat="server" Height="30px" Text="LƯU KHÁCH HÀNG" Width="30%"
                        OnClick="luudanhmuc_Click" />
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>
